package com.service;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SendMQService {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendMiaoshaOK(String msg){
        //交换机，绑定key,消息内容
        rabbitTemplate.convertAndSend("fanoutExchange_2020_2",null,msg);
    }




}
